import axios from "../axios";
import apiList from "./api-list";
import type { ExceptionLogDTO, LogDTO, QueryExLogVO, QueryLogVO } from "./types";

class LogController {
    getLoginLog(pageNo: number, pageSize: number) {
        return axios.get<LogDTO[]>(apiList.getLoginLog, { pageNo, pageSize });
    }
    getLog(query: QueryLogVO) {
        return axios.post<LogDTO[]>(apiList.getLog, query);
    }
    getLogTypes() {
        return axios.get<string[]>(apiList.getLogTypes, {})
    }
    getExLog(query: QueryExLogVO) {
        return axios.post<ExceptionLogDTO[]>(apiList.getExceptionLog, query);
    }
    getExLogTypes() {
        return axios.get<string[]>(apiList.getExceptionLogTypes, {});
    }
}

export default LogController;